package main.java.com.huizluo.stagetwo.phone;
//通话套餐类
public class CallComboImpl extends CallCombo{
    private Integer callTime;//通话时间，单位秒
    private Integer shortMsg;//短信条数

    public CallComboImpl(int callTime, int shortMsg, double cost) {
        super();
        this.callTime = callTime;
        this.shortMsg = shortMsg;
        this.costPerMonth = cost;
    }

    public void ShowAllCombo() {
        System.out.printf("通话套餐包含 通话时长：%d 短信条数：%d ；每月资费：%f元\n",this.callTime,this.shortMsg,this.costPerMonth);
    }

    public void call(Integer time, PhoneCard card) {
        System.out.println("正在通话");
        card.calculateCallTime(time);
    }
}
